package com.example.springbook.demos.web.book.controller;

import com.example.springbook.demos.web.book.model.BookInfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Q
 * @create 2025-06-15-17:31
 */
@RequestMapping("/test")
@RestController
public class TestController {
    @RequestMapping("/t1")
    public String t1(){
        int[] arr = {1,2,3};
        System.out.println(arr[5]);
        return "t1";
    }
    @RequestMapping("/t2")
    public Integer t2(){
        int a = 10/0;
        return 10;
    }
    @RequestMapping("/t3")
    public Boolean t3(){
        String a = null;
        System.out.println(a.length());
        return true;
    }
    @RequestMapping("/t4")
    public BookInfo t4(){
        return new BookInfo();
    }

}